package leetcode.剑指offer;

public class 零到n减1中缺失的数字53 {
    public int missingNumber(int[] nums) {
        int sum = 0,sum1 = 0;
        for (int i = 0; i < nums.length; i++) {
            sum+=i;
            sum1 +=nums[i];
        }
        return sum+nums.length-sum1;
    }
}
